<#include "/page/front/common/_layout.html"/>
<@html title="${current_user.nickname} 的个人主页 - ${siteTitle!}" description="${current_user.nickname} 的个人主页" sidebar_user_info="show" sidebar_create="show">
<div class="panel panel-default">
    <div class="panel-heading">
        <ol class="breadcrumb">
            <li><a href="${baseUrl!}/">首页</a></li>
            <li class="active">${current_user.nickname!}</li>
        </ol>
    </div>
    <div class="panel-body">
        <a href="${baseUrl!}/user/${current_user.id!}">
            <img class="avatar" src="${current_user.avatar!}" title="${current_user.nickname!}" width="48">
        </a>&nbsp;
        <span><a href="${baseUrl!}/user/${current_user.id!}">${current_user.nickname!}</a></span>
        <div>
            <#if day??>
                已连续签到<a href="${baseUrl!}/mission/top10" style="font-size: 20px; color: red;"> ${day!} </a>天
            </#if>
        </div>
        <div style="margin-top: 10px;">
            <span>积分: ${current_user.score!} </span>
        </div>
        <div>
            <span>
                <span class="glyphicon glyphicon-bookmark"></span>
                <a class="dark" href="${baseUrl!}/user/collects/${current_user.id!}">
                    ${collectPage.totalRow!}话题收藏
                </a>
            </span>
        </div>
        <#if current_user.url?? && current_user.url != "">
            <div>
                <span class="glyphicon glyphicon-home"></span>
                <a href="${current_user.url!}" target="_blank">${current_user.url!}</a>
            </div>
        </#if>
        <span class="glyphicon glyphicon-log-in"></span>
        注册时间 ${current_user.formatDate(current_user.in_time)!}
    </div>
</div>

<div class="panel panel-default">
    <div class="panel-heading">
        <span class="glyphicon glyphicon-th-list"></span>
        最近创建的话题
    </div>
    <div class="panel-body">
        <#list topics.getList() as topic>
            <div class="media">
                <div class="media-left">
                    <a href="${baseUrl!}/user/${topic.author_id}">
                        <img src="${topic.avatar!}" alt="avatar" class="media-object avatar">
                    </a>
                </div>
                <div class="media-body">
                    <div class="media-heading item-title">
                        <a href="${baseUrl!}/topic/${topic.id!}.html">${topic.title!}</a>
                    </div>
                    <p class="small-fade">
                        <#if topic.top == 1>
                            <a class="node" href="javascript:;">置顶</a>
                        <#elseif topic.good == 1>
                            <a class="node" href="${baseUrl!}/?tab=good">精华</a>
                        <#else>
                            <a class="node" href="${baseUrl!}/?tab=${topic.tab!}">${topic.sectionName!}</a>
                        </#if>
                        • ${topic.reply_count!} 个回复 • ${topic.view!} 次浏览 • ${topic.formatDate(topic.last_reply_time)!}
                    </p>
                </div>
                <#if topic.last_reply_author_avatar??>
                    <div class="media-right">
                        <a href="${baseUrl!}/user/${topic.last_reply_author_id}" title="最后回复">
                            <img src="${topic.last_reply_author_avatar}" width="25" style="border-radius: 25px;" />
                        </a>
                    </div>
                </#if>
            </div>
            <#if topic_has_next>
                <div class="divide"></div>
            </#if>
        </#list>
    </div>
    <div style="padding: 10px;">
        <a class="dark" href="${baseUrl!}/user/topics/${current_user.id!}">查看更多&gt;&gt;</a>
    </div>
</div>
<div class="panel panel-default">
    <div class="panel-heading">
        <span class="glyphicon glyphicon-th-list"></span>
        最近参与的话题
    </div>
    <div class="panel-body">
        <#list myReplyTopics.getList() as topic>
            <div class="media">
                <div class="media-left">
                    <a href="${baseUrl!}/user/${topic.author_id}">
                        <img src="${topic.avatar!}" alt="avatar" class="media-object avatar">
                    </a>
                </div>
                <div class="media-body">
                    <div class="media-heading item-title">
                        <a href="${baseUrl!}/topic/${topic.id!}.html">${topic.title!}</a>
                    </div>
                    <p class="small-fade">
                        <#if topic.top == 1>
                            <a class="node" href="javascript:;">置顶</a>
                        <#elseif topic.good == 1>
                            <a class="node" href="${baseUrl!}/?tab=good">精华</a>
                        <#else>
                            <a class="node" href="${baseUrl!}/?tab=${topic.tab!}">${topic.sectionName!}</a>
                        </#if>
                        • ${topic.reply_count!} 个回复 • ${topic.view!} 次浏览 • ${topic.formatDate(topic.last_reply_time)!}
                    </p>
                </div>
                <#if topic.last_reply_author_avatar??>
                    <div class="media-right">
                        <a href="${baseUrl!}/user/${topic.last_reply_author_id}" title="最后回复">
                            <img src="${topic.last_reply_author_avatar}" width="25" style="border-radius: 25px;" />
                        </a>
                    </div>
                </#if>
            </div>
            <#if topic_has_next>
                <div class="divide"></div>
            </#if>
        </#list>
    </div>
    <div style="padding: 10px;">
        <a class="dark" href="${baseUrl!}/user/replies/${current_user.id!}">查看更多&gt;&gt;</a>
    </div>
</div>
</@html>